package com.shujushow.chapter01.controller;

import com.shujushow.chapter01.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by xinshu on 2016/3/31.
 */
@Controller
public class Chapter01Controller {

    @Autowired
    private HelloService helloService;

    @RequestMapping("/")
    @ResponseBody
    public String helloWord(){
        return helloService.getHelloMessage();
    }
}
